.ui-widget-overlay {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  width: auto !important;
  opacity: .75 !important;
  filter:Alpha(Opacity=75) !important;
  background: #000 !important;
}
.ui-dialog {
  position: absolute;
  background-color: #fff;
  color: #000;
  border: 4px solid #22A7F2;
  width: auto;
  z-index: 1;
  #dialog_loading {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 208px;
    height: 13px;
    margin: -6px 0 0 -104px;
  }
  .ui-dialog-titlebar {
    position: relative;
    width: 100%;
    height: 33px;
    background-color: #22A7F2;
  }
  .ui-dialog-title {
    float: left;
    height: 33px;
    line-height: 33px;
    font-size: 16px;
    padding-left: 10px;
    color: white;
  }
  .ui-dialog-titlebar-close {
    background-color: #22A7F2;
    padding-right:0;
    padding-left:0;
    padding-top: 5px;
    position: absolute;
    right: 10px;
    width: 22px;
    height: 33px;
    line-height: 33px;
    border: none;
    span {
      display: block;
      margin: 1px;
      background: transparent image_url('refinery/cross.png') top left no-repeat;
      text-indent:-10000px;
    }
  }
  .ui-dialog-titlebar-close:hover, .ui-dialog-titlebar-close:focus {
    padding: 0;
  }
  iframe {
    clear:both;
    border: 0px none;
    margin-bottom:-1px;
    margin-top:1px;
    width: 100% !important;
  }
}
/** Hide the tab without using display:none; This is required to hide flash embeds etc.**/
.ui-tabs-hide {
  display: block !important;
  height: 0 !important;
  width: 0 !important;
  border: 0px none !important;
  visibility: hidden !important;
  position: absolute;
  left: -10000px;
  top: -10000px;
  object,
  embed {
    height: 0px !important;
    width: 0px !important;
  }
}
.ie7 .ui-tabs-hide {
  display: none !important !important;
  height: auto !important !important;
  width: auto !important !important;
  position: static;
}
.ui-tabs li.ui-state-default {
  float: left;
  list-style: none;
  margin-right: 2px;
}
.ui-tabs .ui-state-default a {
  background-color: #bcbcbc;
  color: white;
  padding: 8px 13px;
  border-bottom: none;
  display: block;
  margin-top: 6px;
}
.ui-tabs .ui-state-active a {
  background-color: #808080;
  padding: 11px 13px;
  margin-top: 0px;
}


/*
 * Styles so Refinery admin is compatible with jquery-ui stylesheet:
 */
#menu {
  &.ui-corner-all {
    border: none;
  }

  &.ui-widget {
    font-family: inherit;
    color: inherit;
  }
}

#page-tabs {
  &.ui-widget {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
  }

  &.ui-corner-all {
    border: none;
  }

  &.ui-tabs {
    padding: 0;

    .ui-tabs-panel {
      padding: 0;
    }

    .ui-tabs-nav li {
      &.ui-state-default a {
        padding: 8px 13px;
      }

      &.ui-state-active a {
        padding: 11px 13px;
      }
    }
  }

  #page_parts {
    &.ui-corner-all {
      border: none;
    }

    &.ui-widget-header {
      background: none;

      .ui-state-default {
        border: none;
        background: none;
        padding-bottom: 0;
        margin: 0 2px 0 0;
      }
    }

    &.ui-helper-reset {
      line-height: inherit;
    }

    .ui-tabs-anchor {
      color: white;
    }
  }

  #page_part_editors {
    .ui-corner-bottom {
      border: none;
    }
  }
}

.ui-dialog[aria-describedby=editor_dialog],
.ui-dialog[aria-describedby=dialog_iframe] {
  outline: none;

  &.ui-dialog {
    padding: 0;
  }

  &.ui-corner-all {
    border: 4px solid #22A7F2;
    border-radius: 0;
  }

  &.ui-widget {
    font-family: inherit;
    color: inherit;
  }

  .ui-widget-header {
    background-image: none;

    &.ui-corner-all {
      border: none;
      border-radius: 0;
    }
  }

  .ui-dialog-titlebar {
    padding: 0;

    .ui-dialog-title {
      font-weight: normal;
    }

    .ui-dialog-titlebar-close {
      background-color: #22A7F2;
      background-image: none;
      border: none;
      outline: none;
      cursor: pointer;
      right: 10px;

      .ui-button-text {
        display: none;
      }

      &.ui-button-icon-only .ui-icon {
        position: static;
        height: 20px;
      }
    }
  }

  .ui-dialog-content {
    padding: 0;
    overflow: visible;
  }

  .editor_dialog {
    border: none;
  }

  iframe#dialog_frame, iframe#dialog_iframe {
    display: block !important;
  }
}
